<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>用户注册</title>
<link rel="stylesheet" type="text/css" href="<%=path%>/jsp/admin/css/admin_login.css" />
</head>
<script src="<%=path%>/jsp/admin/js/jquery-1.3.1.js" type="text/javascript"></script>
    <!--背景线条特效-->
   
<script type="text/javascript">

    //每单击一次，就会随机换一个验证码
	function replaceImage(){
	    var imgObj=document.getElementById("codePic");
	    imgObj.src="<%=path%>/VerificationCode?ran=" + Math.random();
	}

	//js判断用户有没有输入用户名和密码和验证码，没输入提示为空
	$(document).ready(function() {

		$("#btOK").click(function() {
			var user = $("#username");
			var pwd = $("#pwd");
			var check = $("#check");

			if (user.val() == '') {
				alert("用户名输入框为空");
				return false;
			} else if (pwd.val() == '') {
				alert("密码输入框为空");
				return false;
			} else if (check.val() == '') {
				alert("验证码输入框为空");
				return false;
			}
			return true;
		});
	});
</script>
<body style="background:url(<%=path%>/image/561.jpg)">
	<div class="admin_login_wrap" >
		<h1>用户注册</h1>
		<div class="adming_login_border">
			<div class="admin_input">
				<form action="<%=path%>/IndexServlet?flag=_ZhuChe"
					method="post">
					<ul class="admin_items">
						<li><label for="user">用户名：</label> <input type="text"
							name="username" id="username" placeholder="请输入用户名" size="40" class="admin_input_style" />
						</li>
						<li><label for="pwd">密码：</label> <input type="password"
							name="pwd" id="pwd" placeholder="请输入密码"  size="40" class="admin_input_style" /></li>
						<li><label for="pwd">验证码：<img id="codePic"
								src="<%=path%>/VerificationCode" id="" onclick="replaceImage()" /></label>
							
							<!-- 隐含域（用于用户提交验证码） -->
							<input type="text" name="check" id="check" size="40"
							class="admin_input_style" /></li>
						<li><input type="submit" id="btOK" tabindex="3" value="提交"
							class="btn btn-primary" /></li>
							
							<!-- 用来显示提示信息的 -->
						<li><span style="color: #666; font-family: 黑体">${msg}</span></li>
					</ul>
				</form>
			</div>
		</div>
		<p class="admin_copyright">
			<a tabindex="5" href="<%=path%>/html/Login.jsp">已有账号登录</a>
			<a tabindex="5" href="<%=path%>/html/index.jsp" target="_blank">返回首页</a> &copy; 2018-2020
		</p>
	</div>
</body>
</html>